from django.contrib import admin
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import VacateDetail,VacateList,NoticeViewSet,AttendanceViewSet
router=DefaultRouter()
router.register(prefix='notice',viewset=NoticeViewSet,base_name='notice')
router.register(prefix='attendance',viewset=AttendanceViewSet,base_name='attendance')

urlpatterns = [
    path("vacates/", VacateList.as_view(), name="vacate_list"),
    path("vacates/<int:pk>/", VacateDetail.as_view(), name="vacates_detail"),
]  # 此时应用还没有任何分发能力

urlpatterns+=router.urls